package cn.edu.sgu.www.mhxysy.mapper.equipment;

import cn.edu.sgu.www.mhxysy.entity.equipment.EquipmentAttribute;
import cn.edu.sgu.www.mhxysy.vo.except.AttributeVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Repository
public interface EquipmentAttributeMapper extends BaseMapper<EquipmentAttribute> {

    /**
     * 通过装备ID删除装备属性
     * @param equipmentId 装备ID
     */
    void deleteByEquipmentId(@Param("equipmentId") String equipmentId);

    /**
     * 通过装备ID查询装备属性列表
     * @param equipmentId 装备ID
     * @return List<AttributeVO>
     */
    List<AttributeVO> selectAttributes(@Param("equipmentId") String equipmentId);

    /**
     * 查询装备的各项总属性
     * @param equipmentId 装备ID
     * @return List<AttributeVO>
     */
    List<AttributeVO> selectTotalAttributes(@Param("equipmentId") String equipmentId);

    /**
     * 分页查询装备属性列表
     * @param page 分页参数
     * @param equipmentId 装备ID
     * @return Page<EquipmentAttribute>
     */
    Page<EquipmentAttribute> selectByPage(Page<EquipmentAttribute> page, @Param("equipmentId") String equipmentId);
}